<?php
namespace app\admin\controller;
/**
 * 仪器控制器
 */
class Notice extends AdminBase
{
    
    /**
     * 仪器列表
     */
    public function noticeList()
    {
        
        $this->assign('list', $this->logicNotice->getNoticeList());
        
        return $this->fetch('notice_list');
    }
    
    /**
     * 仪器添加
     */
    public function noticeAdd()
    {
        
        IS_POST && $this->jump($this->logicNotice->noticeEdit($this->param));
        
        return $this->fetch('notice_edit');
    }
    
    /**
     * 仪器编辑
     */
    public function noticeEdit()
    {
        
        IS_POST && $this->jump($this->logicNotice->noticeEdit($this->param));
        
        $info = $this->logicNotice->getNoticeInfo(['id' => $this->param['id']]);
        
        $this->assign('info', $info);
        
        return $this->fetch('notice_edit');
    }
    
    /**
     * 仪器删除
     */
    public function noticeDel($id = 0)
    {
        
        $this->jump($this->logicnotice->noticeDel(['id' => $id]));
    }
}